Ext.define("wmf.view.ec.query", {
    extend: "wmf.lib.FormPanel",
    alias: "widget.ecQuery",
	anchor: '100% 100%',
    border: false,
    fieldDefaults: {
        labelWidth: 90
    },
    items: [{
        xtype: "textfield",
        name: "ecName", 
        fieldLabel: "企业名称"
    },{
        xtype: "textfield",
        name: "id", 
        fieldLabel: "企业ID"
    },{
    	xtype: 'combo',
		emptyText:  '请选择...',
		hiddenName: 'province',
		autoSelect: true,
		displayField: 'name',
		queryMode: 'local',
		valueField: 'province',
		triggerAction: 'all',
		editable: false,
		store: 'ec.province',
        name: "province", 
        fieldLabel: "所属省份"
    },{
    	xtype: 'fieldcontainer',
        fieldLabel: "合同起始时间",
        combineErrors: true,
        msgTarget : 'side',
        layout: 'hbox',
        items: [{
        	xtype: "datefield",
            name: "constractBeginMonthStart", 
            format:'Ym',
            maxLength:50,
            labelWidth: '30px',
            flex: 4,
            vtype: 'timerange',
            editable : false,
            endTimeField: 'constractBeginMonthEnd',
    	    emptyText:'请选择开始时间'
        },{
        	xtype: "datefield",
            name: "constractBeginMonthEnd", 
            fieldLabel: "至",
            format:'Ym',
            maxLength:50,
            labelWidth: '30px',
            flex: 5,
            vtype: 'timerange',
            editable : false,
            startTimeField: 'constractBeginMonthStart',
     	    emptyText:'请选择截止时间'
        }]
    },{
    	xtype: 'fieldcontainer',
        fieldLabel: "合同终止时间",
        combineErrors: true,
        msgTarget : 'side',
        layout: 'hbox',
        items: [{
        	xtype: "datefield",
            name: "constractEndMonthStart", 
            format:'Ym',
            maxLength:50,
            labelWidth: '30px',
            flex: 4,
            vtype: 'timerange',
            editable : false,
            endTimeField: 'constractEndMonthEnd',
    	    emptyText:'请选择开始时间'
        },{
        	xtype: "datefield",
            name: "constractEndMonthEnd", 
            fieldLabel: "至",
            format:'Ym',
            maxLength:50,
            labelWidth: '30px',
            flex: 5,
            vtype: 'timerange',
            editable : false,
            startTimeField: 'constractEndMonthStart',
     	    emptyText:'请选择截止时间'
        }]
    }],
    
	dockedItems: [{
		xtype: 'toolbar',
		dock: 'bottom',
		layout: {
			type: 'hbox',
			alian: 'center',
			flex: 1
		},
		
		defaults: {
				xtype: 'button'
		},
		items: [{
			xtype : 'tbfill'
		},{
			itemId: 'save',
			icon: 'resources/icons/find.png',
			formBind: true,
			text: translations.global.operation.query
		},{
			itemId: 'reset',
			icon: 'resources/icons/icon_recover.png',
			text: translations.global.operation.reset
		},{
			itemId: 'cancel',
			icon : 'resources/icons/icon_revoke.png',
			text: translations.global.operation.cancel
		}]
	}]
});